<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value=$title|default:'添加菜单权限项'}}
{{assign var="app" value='cat'}}
{{assign var="act" value=''}}
<title>{{$title}}{{$text}} - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
{{include file="{{$smarty.const.PLUG}}verify/verify.html"}}
{{include file="{{$smarty.const.PLUG}}drag/drag.html"}}
</head>
<body>

{{include file="include/sidebar.html"}}

<div class="body_right">
<div id="content">
	<div class="search">
	  <ul class="bread">
		<li>
		  ◆ {{$title}}管理 －＞ {{$text}}{{$title}}
		</li>
	  </ul>
	</div>
		
	<!--内容 S-->
	<form action="index.php?app=cat&act=save" name="form1" class="form verify" id="form" method="post">
	<input type="hidden" name="id" value="{{$result.id}}"/>
	<input type="hidden" name="verifyId" value="{{$smarty.get.id|default:$smarty.get.parent_id}}"/>
	<table class="table table-bordered modify">
	  <tbody>
		<tr>
			<td>标题：</td>
			<td>
				<input class="input-xlarge" type="text" name="title" maxlength="50" value="{{$result.title}}"> <span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>所属父分类：</td>
			<td>
				<input class="input-xlarge" type="hidden" name="parent_id" value="{{$smarty.get.parent_id}}"/>
				<span class="cat_name">{{$parent_cat_title}}</span>
				<select class="select_parent_category" style="display:none;">
					{{html_options options=$parentList selected=$result.parent_id}}
				</select>
				<label class="inline checkbox" style="font-size:13px;">编辑父分类<input type="checkbox" class="edit_parent_category" value="1"/></label>
				<script>
				$(function(){
					$('input.edit_parent_category').click(function(){
						if($(this).attr('checked')) $("select.select_parent_category").fadeIn();
						else $("select.select_parent_category").fadeOut();
					});
					$("select.select_parent_category").change(function(){
						$("input[name='parent_id']").val($(this).val());
						$("span.cat_name").html($(this).find(":checked").text().replace('|_','').replace(/　/g,''));
					});
				});
				</script>
			</td>
		</tr>
		<!-- <tr>
			<td>唯一名称：</td>
			<td>
				<input class="input-small" type="text" name="item" value="{{$result.item}}"/> 
				<span class="notice">尽量用英文，默认为空</span>
			</td>
		</tr> -->

		<!-- <tr>
			<td>热门重要：</td>
			<td>
				{{html_radios name=hot options=array('否','是') checked=$result.hot|default:0}}
				<span class="notice">(设为＂是＂可以防止直接误删除)</span>
			</td>
		</tr> -->
		<tr>
			<td>是否发布：</td>
			<td>
				{{html_radios name=publish options=array('否','是') checked=$result.publish|default:1}}
			</td>
		</tr>
		<!-- <tr>
			<td>备注：</td>
			<td>
				<textarea name="description">{{$result.description}}</textarea>
			</td>
		</tr> -->
		<tr>
			<td>URL链接：</td>
			<td>
				<input class="input-xlarge" type="text" name="params[link]" value="{{$result.params.link}}"/> 
			</td>
		</tr>
		
	  </tbody>
	</table>
	<div class="bottom_button">
		<button type="submit" class="btn btn-info"><i class="icon-ok icon-white"></i>确认</button>
	</div>
	</form>
	<!--内容 E-->
</div>
</div>

</body>
</html>